﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PR_BudgetManagementTestDtl.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PR_BudgetManagementTestDtl" %>

<%@ Register src="../Controls/EmployeeTypeCombo.ascx" tagname="EmployeeTypeCombo" tagprefix="uc1" %>
<%@ Register src="../Controls/JobSiteCombo.ascx" tagname="JobSiteCombo" tagprefix="uc2" %>
<%@ Register src="../Controls/MasterYear.ascx" tagname="MasterYear" tagprefix="uc3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>รายละเอียดการบริหารวงเงิน</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 

    <script type="text/javascript">   

           function openProjectDetails(id,posid,prmid,jobsiteid) {
               radopen("PR_BudgetManagementTestDtl_Edit.aspx?mng_test_seq=" + id + "&pos_type_seq=" + posid + "&prm_seq=" + prmid + "&job_site_seq=" + jobsiteid , "ProjectDtls");
               
                return false;
            }

          function isNumberKey(event)  // ตัวเลขอย่างเดียว
          {
             var charCode = (event.which) ? event.which : event.keyCode
             if(charCode > 31 && (charCode < 48 || charCode > 57)){
                 //                 alert("กรอกได้แต่ตัวเลขครับ!")
                 //alert(charCode);
                 return false;
	          }
             return true;
          }
           function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
                function pagerefresh() {
                    location.reload(true);
                }

</script>
    <style type="text/css">


.RadGrid_Default
{
    font:12px/16px "segoe ui",arial,sans-serif;
}

.RadGrid_Default
{
    border:1px solid #828282;
    background:#fff;
    color:#333;
}

.RadGrid_Default .rgMasterTable
{
    border-collapse:separate;
}

.RadGrid_Default .rgMasterTable
{
    font:12px/16px "segoe ui",arial,sans-serif;
}

.RadGrid_Default .rgHeader
{
    color:#333;
    text-decoration:none;
}

.RadGrid_Default .rgHeader
{
	border:0;
	border-bottom:1px solid #828282;
	padding-top:5px;
	padding-bottom:4px;
	background:#eaeaea 0 -2300px repeat-x url('mvwres://Telerik.Web.UI, Version=2009.1.311.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Default.Grid.sprite.gif');
	text-align:left;
	font-weight:normal;
}

.RadGrid_Default .rgHeader
{
	padding-left:7px;
	padding-right:7px;
}

.RadGrid_Default .rgHeader
{
	cursor:default;
}

    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>   
    
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        
    </telerik:RadAjaxManager>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" >
    </telerik:RadAjaxLoadingPanel>   
    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>
   <telerik:RadWindow 
        id="ProjectDtls" 
        runat="server"
        showcontentduringload="false"
        VisibleStatusbar="false"
        title="แบบทดสอบการบริหารวงเงิน"
        width="500px"
        Height="200px"        
        Modal="true"
        behaviors="Close" OnClientClose="pagerefresh">
    </telerik:RadWindow>
</Windows>

</telerik:RadWindowManager>
  
  <table align="center" width ="900px" >
  <tr>
  <td>
  <div class ="moduleDivSlim850">
  <div class="moduleDivBottom850">
  <table Width="830px" align = "center">
        <tr>
            <td align="left" class="tableHeader">
                แบบทดสอบการบริหารวงเงิน
            </td>
            </tr>
         <tr>
         <td>
            <asp:Panel ID="PanelGrid" 
                runat="server" 
                Width="820px" 
                Height="150px" 
                ScrollBars="Auto" 
                HorizontalAlign="Center" >
                <telerik:RadGrid ID="RadGrid2" 
                    runat="server" Width = "800px" 
                    onitemdatabound="RadGrid2_ItemDataBound">
                    <MasterTableView CellSpacing="-1">
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                    </MasterTableView>
                </telerik:RadGrid>
                <asp:Button ID="cmdShowManage" runat="server" Text="แสดงข้อมูลการบริหารวงเงิน" onclick="cmdShowManage_Click1"  />              
        </asp:Panel>
        </td>
        </tr>
        </table>
  </div>
  </div>
  </td>
  </tr>
  <tr>
  <td>          
       <div class ="moduleDivSlim850">
        <div class="moduleDivBottom850">
        <table Width="830px" align = "center">
        <tr>
            <td align="left" class="tableHeader">
                ผลการบริหารวงเงินเลื่อนเงินเดือน
            </td>
        </tr>
        <tr>
        <td >
            <asp:Panel ID="Panel1" 
            runat="server" 
            Width="820px" 
            Height="320px" 
            ScrollBars="Auto">
            <telerik:RadGrid ID="RadGrid1" runat="server" 
                    AllowFilteringByColumn="True" 
                    AllowAutomaticDeletes="True"
                    AllowMultiRowEdit="True" 
                    AllowMultiRowSelection="True" AllowPaging="True" 
                    AllowSorting="True" 
                    AutoGenerateColumns="False" EnableAJAX="True" 
                    EnableAJAXLoadingTemplate="True" GridLines="None" 
                    OnItemCommand="RadGrid1_ItemCommand" Skin="Outlook" 
                    GroupingSettings-GroupByFieldsSeparator = "&nbsp;&nbsp;&nbsp;&nbsp;"
                    GroupingSettings-GroupContinuedFormatString = ""
                    GroupingSettings-GroupContinuesFormatString = ""
                    GroupingSettings-GroupSplitFormat = ""
                    Width="800px">
                    <MasterTableView 
                        AllowMultiColumnSorting="True" 
                        CellSpacing="-1" 
                        ClientDataKeyNames="prm_emp_seq"
                        CommandItemDisplay="Top"
                        DataKeyNames="prm_emp_seq" 
                        InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                        NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                        <CommandItemTemplate>
                            <table width="100%">
                                <tr>
                                    <td>

                                    </td>
                                    <td align="right">
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>  
                        <ExpandCollapseColumn Visible="True">
                        </ExpandCollapseColumn>
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <GroupByFields>
                                    <telerik:GridGroupByField 
                                        FieldName="pos_type_seq" 
                                        HeaderText="ตำแหน่งประเภท" />
                                </GroupByFields>
                                <SelectFields>
                                    <telerik:GridGroupByField 
                                        FieldName="pos_type_name" 
                                        HeaderText="ตำแหน่งประเภท" 
                                        HeaderValueSeparator = " " />
                                </SelectFields>                                    
                            </telerik:GridGroupByExpression>
                            
                            <telerik:GridGroupByExpression>
                                <GroupByFields>
                                    <telerik:GridGroupByField 
                                        FieldName="class_seq" 
                                        HeaderText="ระดับตำแหน่ง" />
                                </GroupByFields>
                                <SelectFields>
                                    <telerik:GridGroupByField 
                                        FieldName="class_name" 
                                        HeaderText=" " 
                                        HeaderValueSeparator = " " />
                                </SelectFields>                                    
                            </telerik:GridGroupByExpression>
                            
                        </GroupByExpressions>       
                        <Columns>
                            <telerik:GridEditCommandColumn Visible = "false"
                                EditText = "คลิกเพื่อแก้ไขรายการ"
                                ButtonType="ImageButton">
                            <HeaderStyle HorizontalAlign="Center" Width="15px" />
                            <ItemStyle HorizontalAlign="Center" Width="15px" />
                                      
                            </telerik:GridEditCommandColumn>
 
                            <telerik:GridButtonColumn ButtonType="ImageButton" Visible = "false"
                                CommandName="Delete" 
                                ConfirmDialogType="RadWindow" ConfirmText="ลบข้อมูลที่เลือก?" 
                                Text="คลิกเพื่อลบข้อมูล" 
                                UniqueName="column1">
                                <HeaderStyle HorizontalAlign="Center" Width="10px" />
                                <ItemStyle HorizontalAlign="Center" Width="10px" />
                            </telerik:GridButtonColumn>

                            <telerik:GridTemplateColumn                            
                                DataField="emp_text"
                                HeaderText="ชื่อผู้รับการประเมิน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                HeaderStyle-Width = "150px"
                                UniqueName="emp_text">
                               <ItemTemplate>
                                    <%# Eval("emp_text")%>                        
                               </ItemTemplate>
                                <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                         </telerik:GridTemplateColumn>
                         
                         <telerik:GridTemplateColumn
                            DataField="pos_name" 
                            HeaderText="ตำแหน่ง" 
                            ShowFilterIcon="false"
                            FilterControlWidth="100%"
                            CurrentFilterFunction="Contains"
                            AutoPostBackOnFilter="true"
                            HeaderStyle-HorizontalAlign = "Center"
                            HeaderStyle-Width = "150px"
                            UniqueName="PosName" >
                            <ItemTemplate>
                                <%# Eval("pos_name")%>                        
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>                            
                            <telerik:GridTemplateColumn Visible = "false"
                                DataField="class_name"
                                HeaderText="ระดับ" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                UniqueName="ClassName">
                                <ItemTemplate>
                                    <%# Eval("class_name")%>                        
                                </ItemTemplate>
                           </telerik:GridTemplateColumn>
                           <telerik:GridTemplateColumn                            
                                DataField="salary"                             
                                HeaderText="เงินเดือน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Right"
                                UniqueName="salary">
                                <ItemTemplate>
                                    <%# Eval("salary", "{0:N2}")%>                        
                                </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>
                           <telerik:GridTemplateColumn                            
                                DataField="sal_base"                             
                                HeaderText="ฐานในการคำนวณ" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Right"
                                UniqueName="sal_base">                                
                                <ItemTemplate>
                                    <%# Eval("sal_base", "{0:N2}")%>                        
                                </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>
                           <telerik:GridTemplateColumn                            
                                DataField="sub_sco_level_name"                             
                                HeaderText="ผลการประเมิน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="sub_sco_level_name">                                
                                <ItemTemplate>
                                    <%# Eval("sub_sco_level_name")%> (<%# Eval("score", "{0:N2}")%>)                        
                                </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>
                           <telerik:GridTemplateColumn                            
                                DataField="percen_promote"                             
                                HeaderText="เปอร์เซนต์ที่เลื่อน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="percen_promote">                                
                                <ItemTemplate>
                                    <%# Eval("percen_promote", "{0:N2}")%>(<%# Eval("percent_amount", "{0:N2}")%>)                      
                                </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>      
                           <telerik:GridTemplateColumn                            
                                DataField="amount"                             
                                HeaderText="เงินเดือนที่เลื่อน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Right"
                                UniqueName="amount">                                
                                <ItemTemplate>
                                    <%# Eval("amount", "{0:N2}")%>                         
                                </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>                      
                        </Columns>
 
                        <EditFormSettings EditFormType="WebUserControl" 
                            UserControlName="../UserControls/PR_Appraisal.ascx">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                    <ClientSettings AllowColumnHide="True" 
                        AllowColumnsReorder="True" 
                        EnableRowHoverStyle="True" 
                        ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </asp:Panel>
        </td>
        </tr>
        </table>
        </div>
        </div>
        </td>
        </tr>
        </table>
</form>
</body>
</html>
